package com.lm.selenium.ele;

import lombok.Data;

import java.util.List;

@Data
public class BatchResult {
    private int total;                 // 总请求数量
    private int successCount;         // 成功数量
    private int failedCount;          // 失败数量
    private List<PageResult> results; // 每个页面的详细结果列表

    public BatchResult(List<PageResult> results) {
        this.results = results;
        this.total = results.size();
        this.successCount = (int) results.stream().filter(r -> r.getError() == null).count();
        this.failedCount = total - successCount;
    }
}
